PHP 7 Tutorial: Master the Concepts of PHP: A Step By Step Process by ANMOL GOYAL

PHP 7 Tutorial: Master the Concepts of PHP: A Step By Step Process by ANMOL GOYAL

Author:ANMOL GOYAL
Language: eng
Format: azw3
Published: 2017-09-08T07:00:00+00:00


<?php

class MyClass1 {

public $obj1prop;

}

class MyClass2 {

public $obj2prop;

}

$obj1 = new MyClass1();

$obj1->obj1prop = 1;

$obj2 = new MyClass2();

$obj2->obj2prop = 2;

$serializedObj1 = serialize($obj1);

$serializedObj2 = serialize($obj2);

// default behaviour that accepts all classes

// second argument can be ommited.

// if allowed_classes is passed as false, unserialize converts all objects into __PHP_Incomplete_Class object

$data = unserialize($serializedObj1 , ["allowed_classes" => true]);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.